3.57 \(\int \frac {\sin (e+f x)}{a+b \tan ^2(e+f x)} \, dx\)

Optimal. Leaf size=60 \[ -\frac {\cos (e+f x)}{f (a-b)}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{f (a-b)^{3/2}} \]

[Out]

-cos(f*x+e)/(a-b)/f-arctan(sec(f*x+e)*b^(1/2)/(a-b)^(1/2))*b^(1/2)/(a-b)^(3/2)/f

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 60, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3664, 325, 205} \[ -\frac {\cos (e+f x)}{f (a-b)}-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{f (a-b)^{3/2}} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]/(a + b*Tan[e + f*x]^2),x]

[Out]

-((Sqrt[b]*ArcTan[(Sqrt[b]*Sec[e + f*x])/Sqrt[a - b]])/((a - b)^(3/2)*f)) - Cos[e + f*x]/((a - b)*f)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 325

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[((c*x)^(m + 1)*(a + b*x^n)^(p + 1))/(a*
c*(m + 1)), x] - Dist[(b*(m + n*(p + 1) + 1))/(a*c^n*(m + 1)), Int[(c*x)^(m + n)*(a + b*x^n)^p, x], x] /; Free
Q[{a, b, c, p}, x] && IGtQ[n, 0] && LtQ[m, -1] && IntBinomialQ[a, b, c, n, m, p, x]

Rule 3664

Int[sin[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^2)^(p_.), x_Symbol] :> With[{ff = Free
Factors[Sec[e + f*x], x]}, Dist[1/(f*ff^m), Subst[Int[((-1 + ff^2*x^2)^((m - 1)/2)*(a - b + b*ff^2*x^2)^p)/x^(
m + 1), x], x, Sec[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[(m - 1)/2]

Rubi steps

\begin {align*} \int \frac {\sin (e+f x)}{a+b \tan ^2(e+f x)} \, dx &=\frac {\operatorname {Subst}\left (\int \frac {1}{x^2 \left (a-b+b x^2\right )} \, dx,x,\sec (e+f x)\right )}{f}\\ &=-\frac {\cos (e+f x)}{(a-b) f}-\frac {b \operatorname {Subst}\left (\int \frac {1}{a-b+b x^2} \, dx,x,\sec (e+f x)\right )}{(a-b) f}\\ &=-\frac {\sqrt {b} \tan ^{-1}\left (\frac {\sqrt {b} \sec (e+f x)}{\sqrt {a-b}}\right )}{(a-b)^{3/2} f}-\frac {\cos (e+f x)}{(a-b) f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B]  time = 0.26, size = 121, normalized size = 2.02 \[ \frac {(b-a) \cos (e+f x)+\sqrt {b} \sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b}-\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )+\sqrt {b} \sqrt {a-b} \tan ^{-1}\left (\frac {\sqrt {a-b}+\sqrt {a} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{f (a-b)^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]/(a + b*Tan[e + f*x]^2),x]

[Out]

(Sqrt[a - b]*Sqrt[b]*ArcTan[(Sqrt[a - b] - Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]] + Sqrt[a - b]*Sqrt[b]*ArcTan[(Sq
rt[a - b] + Sqrt[a]*Tan[(e + f*x)/2])/Sqrt[b]] + (-a + b)*Cos[e + f*x])/((a - b)^2*f)

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 158, normalized size = 2.63 \[ \left [-\frac {\sqrt {-\frac {b}{a - b}} \log \left (-\frac {{\left (a - b\right )} \cos \left (f x + e\right )^{2} - 2 \, {\left (a - b\right )} \sqrt {-\frac {b}{a - b}} \cos \left (f x + e\right ) - b}{{\left (a - b\right )} \cos \left (f x + e\right )^{2} + b}\right ) + 2 \, \cos \left (f x + e\right )}{2 \, {\left (a - b\right )} f}, -\frac {\sqrt {\frac {b}{a - b}} \arctan \left (-\frac {{\left (a - b\right )} \sqrt {\frac {b}{a - b}} \cos \left (f x + e\right )}{b}\right ) + \cos \left (f x + e\right )}{{\left (a - b\right )} f}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)^2),x, algorithm="fricas")

[Out]

[-1/2*(sqrt(-b/(a - b))*log(-((a - b)*cos(f*x + e)^2 - 2*(a - b)*sqrt(-b/(a - b))*cos(f*x + e) - b)/((a - b)*c
os(f*x + e)^2 + b)) + 2*cos(f*x + e))/((a - b)*f), -(sqrt(b/(a - b))*arctan(-(a - b)*sqrt(b/(a - b))*cos(f*x +
 e)/b) + cos(f*x + e))/((a - b)*f)]

________________________________________________________________________________________

giac [A]  time = 1.70, size = 81, normalized size = 1.35 \[ -\frac {f \cos \left (f x + e\right )}{a f^{2} - b f^{2}} + \frac {b \arctan \left (\frac {a \cos \left (f x + e\right ) - b \cos \left (f x + e\right )}{\sqrt {a b - b^{2}}}\right )}{\sqrt {a b - b^{2}} {\left (a - b\right )} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)^2),x, algorithm="giac")

[Out]

-f*cos(f*x + e)/(a*f^2 - b*f^2) + b*arctan((a*cos(f*x + e) - b*cos(f*x + e))/sqrt(a*b - b^2))/(sqrt(a*b - b^2)
*(a - b)*f)

________________________________________________________________________________________

maple [A]  time = 0.38, size = 63, normalized size = 1.05 \[ -\frac {\cos \left (f x +e \right )}{\left (a -b \right ) f}+\frac {b \arctan \left (\frac {\left (a -b \right ) \cos \left (f x +e \right )}{\sqrt {\left (a -b \right ) b}}\right )}{f \left (a -b \right ) \sqrt {\left (a -b \right ) b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)/(a+b*tan(f*x+e)^2),x)

[Out]

-cos(f*x+e)/(a-b)/f+1/f*b/(a-b)/((a-b)*b)^(1/2)*arctan((a-b)*cos(f*x+e)/((a-b)*b)^(1/2))

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)^2),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(b-a>0)', see `assume?` for mor
e details)Is b-a positive or negative?

________________________________________________________________________________________

mupad [B]  time = 11.79, size = 112, normalized size = 1.87 \[ \frac {\sqrt {b}\,\mathrm {atan}\left (\frac {-a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a^2+a\,b\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2-3\,a\,b+2\,b^2}{2\,\sqrt {b}\,{\left (a-b\right )}^{3/2}}\right )}{f\,{\left (a-b\right )}^{3/2}}-\frac {2\,\sqrt {a-b}}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,{\left (a-b\right )}^{3/2}+{\left (a-b\right )}^{3/2}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)/(a + b*tan(e + f*x)^2),x)

[Out]

(b^(1/2)*atan((a^2 - a^2*tan(e/2 + (f*x)/2)^2 - 3*a*b + 2*b^2 + a*b*tan(e/2 + (f*x)/2)^2)/(2*b^(1/2)*(a - b)^(
3/2))))/(f*(a - b)^(3/2)) - (2*(a - b)^(1/2))/(f*(tan(e/2 + (f*x)/2)^2*(a - b)^(3/2) + (a - b)^(3/2)))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sin {\left (e + f x \right )}}{a + b \tan ^{2}{\left (e + f x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*tan(f*x+e)**2),x)

[Out]

Integral(sin(e + f*x)/(a + b*tan(e + f*x)**2), x)

________________________________________________________________________________________